home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / library / spnshccn.lha / spanish_accent / Install < prev    next >
Text File  |  1995-09-10  |  4KB  |  123 lines

  1. ; script to install Translator library and español.accent file
  2. ; Should be run from Workbench by double-clicking on the icon
  3.  
  4. (set @default-dest (expandpath "Sys:"))
  5.  
  6. ;; Install library
  7.  
  8.  
  9. (set OS-Version (/ (getversion "dos.library" (resident)) 65536))
  10.  
  11. (if (>= OS-Version 37)
  12.     (if (>= (database "cpu") 68020)
  13.     ((set libext "020") (set name "V37, CPU 68020"))
  14.       ((set libext "v37") (set name "V37")))
  15.   ((set libext "v33") (set name "V33")))
  16.  
  17.  
  18. (set libname (cat libext "_translator.library"))
  19.  
  20. ;; Install library
  21.  
  22. ;; Save old version if it exists.
  23.  
  24.  
  25. (if (exists "libs:translator.library")
  26.     (   (set oldver (getversion "Libs:translator.library"))
  27.         (if (< oldver (* 65536 42))
  28.             (   (set oldnum ("%ld.%ld" (/ oldver 65536) (bitand oldver 65535)))
  29.                 (set oldname ("LIBS:%s-translator.library" oldnum))
  30.                 
  31.                 (rename "LIBS:translator.library"
  32.                     oldname
  33.                     (prompt
  34.                         "You currently have version " oldnum " of the "
  35.                         "origional Commodore translator.library installed. "
  36.                         "Do you wish to have it saved and renamed?")
  37.                     (help "The pre-V42 version of LIBS:translator.library "
  38.                       "currently installed "
  39.                       "will be renamed as " oldname " if you select Proceed.")
  40.                     (confirm))))))
  41.  
  42.     
  43. (copylib
  44.  (source (cat "Libs/" libname))
  45.  (dest "Libs:")
  46.  (confirm)
  47.  (prompt "Install the translator.library "
  48.      "version for use with an Amiga ROM version " name
  49.      " or better.")
  50.  (help "Install the translator shared library file")
  51.  (newname "translator.library"))
  52.  
  53.  
  54. ;; Install accent file
  55.  
  56.  
  57.  
  58. (if (not (exists "Locale:"))
  59.     ((if (not (exists "sys:Locale"))
  60.      (makedir "SYS:Locale"
  61.           (prompt "Creating directory SYS:Locale")
  62.           (help "SYS:Locale is needed by the locale library "
  63.             "and the translator library")
  64.           (infos)
  65.           (safe)))
  66.      
  67.      (makeassign "Locale" "Sys:Locale" (safe))
  68.      (startup "Translator"
  69.       (prompt "Modify S:User-startup?")
  70.       (command "Assign Locale: SYS:Locale"))
  71.      ))
  72.  
  73. (if (not (exists "Locale:Accents"))
  74.     (makedir "Locale:Accents"
  75.           (prompt "Creating directory Locale:Accents")
  76.           (help "Locale:Accents is needed by "
  77.             "the translator library")
  78.           (infos)
  79.           (safe)))
  80.  
  81. (copyfiles
  82.  (help "Select which Accent files you wish installed "
  83.        "into the Locale:Accents/ directory.\n\n"
  84.        "These files specify how words should be pronounced in each "
  85.        "language. At least one needs to be installed if the translator "
  86.        "library is to work.")
  87.  
  88.  (prompt "Which accent files do you wish to install?\n"
  89.      "Note that at least one is needed for the translator "
  90.      "library to work.")
  91.  (source "Accents")
  92.  (dest "Locale:Accents/")
  93.  (pattern "#?.accent")
  94.  (files)
  95.  (confirm))
  96.  
  97. ;; Install environment variables
  98.  
  99.  
  100. (if (= @user-level 2)
  101.     (set accent-file
  102.      (askfile (prompt "Which accent do you wish to use by default?")
  103.           (default "Locale:Accents/american.accent")
  104.           (help "Specify the accent file that contains the default "
  105.             "pronuciation rules for the translator library. "
  106.             "This will be saved in your ENVARC: and ENV: but "
  107.             "can be changed later with the Translator "
  108.             "preferences program (not included).")))
  109.   (set accent-file "Locale:Accents/español.accent"))
  110.  
  111. (if (exists "ENVARC:")
  112.     (textfile
  113.      (dest "ENVARC:Sys/translator.prefs")
  114.      (append accent-file))
  115.   (startup
  116.    (prompt "Modify S:User-Startup")
  117.    (command ("IF NOT EXISTS ENV:Sys\nMakeDir ENV:Sys\nEndIf\n"
  118.          "Setenv Sys/translator.prefs"))))
  119.  
  120. (if (not (exists "ENV:Sys/")) (makedir ("ENV:Sys")))
  121.  
  122. ;; The end!
  123.